package com.agrm.rabc.mapper;

import com.agrm.model.rabc.dto.Role;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.apache.ibatis.annotations.Mapper;

@Mapper
public interface RoleDao extends BaseMapper<Role> {
    default Page<Role> findAll(Role role, Page<Role> page) {
        LambdaQueryWrapper<Role> qw = Wrappers.lambdaQuery(role);
        return selectPage(page, qw);
    }
}
